/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package be.ac.ua.comp.projectGPT.BiddingPolicies;

/**
 * Implementation for a bidding policy on which the auctioneer depends.
 * The bid will be accepted when it is sufficiently higher than a certain minimum.
 */
public class MinimumBidPolicy extends BiddingPolicy {

    long minimumBid;

    public MinimumBidPolicy(long minimumBid) {
        this.minimumBid = minimumBid;
    }

    public boolean accept(long bid, long highestBid) {
        return (bid > highestBid+minimumBid);
    }

    @Override
    public long getSuggestion(long highestBid) {
        return highestBid + minimumBid;
    }

}
